home *** CD-ROM | disk | FTP | other *** search
/ Medabots Cardz / Medabots CD Cardz Sumilidon.bin / mac / assets / sumilidon.dxr / 00260_Script_260 < prev    next >
Text File  |  2001-12-07  |  819b  |  25 lines

  1. global thescore, squam, gNetID, jumbo
  2. property myFile
  3.  
  4.  
  5. on enterframe me
  6.   squam = getOSdirectory()&"\"
  7.   if objectP(myFile) then set myFile = 0  --Delete the instance if it already exists
  8.   myFile = new(xtra "fileio") -- Create an instance of FileIO
  9.   --  openFile(myFile,the moviePath&"info.txt",1) --Open the file with read access
  10.   openFile(myFile,squam&"infos.txt",1) --Open the file with read access
  11.   myVariable = readFile(myFile) --set the variable 'myVariable' to the text of the file 'info.txt'
  12.   if readFile(myFile)=VOID then --checks to see if this file exists
  13.     thescore = 0
  14.   else
  15.     thescore = myVariable
  16.     closeFile(myFile) -- Close the file
  17.   end if
  18.   myFile = 0 -- Dispose of the instance
  19. end
  20.  
  21.  
  22. on exitFrame me
  23.   put thescore into member("scoredump")
  24.   go to the frame
  25. end